﻿using System;
using System.ComponentModel;
using System.Drawing;

namespace HML
{
    /// <summary>
    /// 背景绘制前事件参数
    /// </summary>
    public class SingleAccordionBackgroundDrawBeforeEventArgs : CancelEventArgs
    {
        private readonly float dpi;
        /// <summary>
        /// 系统缩放比例
        /// </summary>
        public float Dpi
        {
            get { return this.dpi; }
        }

        private readonly Graphics graphics;
        /// <summary>
        /// 封装一个GDI+绘图图面 （ 当前 Clip=Bounds_C ）
        /// </summary>
        public Graphics Graphics
        {
            get { return this.graphics; }
        }

        private readonly Rectangle bounds_C;
        /// <summary>
        /// 控件区域（只包含:内容）
        /// </summary>
        public Rectangle Bounds_C
        {
            get { return this.bounds_C; }
        }

        /// <summary>
        /// 背景绘制是否已处理完毕 (True 将会跳过控件的默认绘制)
        /// </summary>
        public new bool Cancel
        {
            get { return base.Cancel; }
            set { base.Cancel = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dpi">系统缩放比例</param>
        /// <param name="graphics">封装一个GDI+绘图图面 （ 当前 Clip=Bounds_C ）</param>
        /// <param name="bounds_C">控件区域（只包含:内容）</param>
        /// <param name="cancel">背景绘制是否已处理完毕 (True 将会跳过控件的默认绘制)</param>
        public SingleAccordionBackgroundDrawBeforeEventArgs(float dpi, Graphics graphics, Rectangle bounds_C, bool cancel):base(cancel)
        {
            this.dpi = dpi;
            this.graphics = graphics;
            this.bounds_C = bounds_C;
        }

    }

}
